<?php


namespace app\common\lib\exception;
use think\Exception;
use Throwable;

/**
 * Class ApiException
 * @package app\common\lib\exception
 */
class ApiException extends Exception
{
    public $message = 'OK'; // 信息
    public $code = 0;  // 业务返回码
    public $httpCode = 500; // http状态码
    /**
     * ApiException constructor.
     * @param string $message
     * @param int $code
     * @param int $httpCode
     */
    public function __construct($message = "", $code = 0, $httpCode = 500)
    {
        $this->message = $message;
        $this->code = $code;
        $this->httpCode = $httpCode;
    }
}